package com.ibeeking.found.msg.service.common.param;

import com.ibeeking.nematos.utils.base.BaseValidationGroup;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @ClassName WxMpAutoMessageParam
 * @Description
 * @Author ibeeking
 * @Date 2021-02-05 19:11
 **/
@Data
public class MpAutoMessageParam implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @NotNull(message = "id不能为空", groups = BaseValidationGroup.Update.class)
    private Long id;

    /**
     * MpId
     */
    @NotNull(message = "公众号id必填")
    private String appId;

    /**
     * 事件类型
     */
    @NotBlank(message = "事件类型不能为空")
    private String eventType;

    @Valid
    private Message message = new Message();

    /**
     * 关键字规则
     */
    private String ruleName;

    private String remark;

    private List<String> keys;

    /**
     * 创建人
     */
    private Long createBy;

    /**
     * 更新人
     */
    private Long modifyBy;

    @Data
    public static class Message {
        /**
         * 消息类型
         */
        @NotBlank(message = "消息类型不能为空")
        private String sourceType;

        /**
         * 回复消息的内容
         */
        @NotBlank(message = "消息内容不能为空")
        private String unionKey;
    }


}
